package com.lianxian.xindong.login.mvp.ui.adapter;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.hxb.library.utils.HxbUtils;
import com.lianxian.xindong.login.R;
import com.lianxian.xindong.login.mvp.model.entity.TagHobbyBean;
import com.zhy.view.flowlayout.FlowLayout;
import com.zhy.view.flowlayout.TagAdapter;

import java.util.List;


/**
 * @author: mi
 * @date: 2021/5/25
 * @description：
 */
public class TagHobbyAdapter extends TagAdapter<TagHobbyBean> {

    private Context mContext;

    public TagHobbyAdapter(Context context, List<TagHobbyBean> datas) {
        super(datas);
        this.mContext = context;
    }

    @Override
    public View getView(FlowLayout parent, int position, TagHobbyBean value) {
        View view = HxbUtils.inflate(mContext, R.layout.item_tag_hobby);
        TextView tvValue = view.findViewById(R.id.tvValue);
        tvValue.setText(value.getValue());
        return view;
    }
}
